# hashtable
class Solution(object):
    def twosum(self,target,nums):
        hashtable=dict()
        for i,num in enumerate(nums):
            if target-num in hashtable:
                print([hashtable[target-num],i])
            hashtable[nums[i]]=i
S=Solution()
S.twosum(10,[1,2,3,4,5,6,7,8,9,])